import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_ncsjqz_getx/widget/app_bar_widget.dart';

/// <summary>
/// todo: 富文本页面
/// author：zwb
/// dateTime： 2021/11/5 13:37
/// filePath： lib/page/show/show_html_page.dart
/// desc:
/// <summary>
///
class ShowHtmlPage extends StatefulWidget {
  final String? htmlStr;
  final String? title;
  final List<Widget>? actions;
  const ShowHtmlPage({Key? key, this.htmlStr, this.title, this.actions}) : super(key: key);

  @override
  _ShowHtmlPageState createState() => _ShowHtmlPageState();
}

class _ShowHtmlPageState extends State<ShowHtmlPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: appBarWidget(
        title: widget.title,
        actions: widget.actions,
      ),
      body: Container(
        child: ListView(
          padding: EdgeInsets.all(0),
          children: [
            Html(data: "${widget.htmlStr ?? ''}")
          ],
        ),
      ),
    );
  }
}
